package com.freemyleft.left.left_app.mian.index.my.accept_setup.Teacher_default_price;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.LinearLayout;

import com.freemyleft.left.left_app.R;
import com.freemyleft.left.left_app.R2;
import com.freemyleft.left.zapp.delegates.LeftDelegate;
import com.freemyleft.left.zapp.ui.recycler.MultipleFields;
import com.freemyleft.left.zapp.ui.recycler.MultipleItemEntity;

import java.util.ArrayList;

import butterknife.BindView;

/**
 * 名师预设价格
 */
public class TeacherDefaultPriceDelegate extends LeftDelegate {
    @BindView(R2.id.recy)
    RecyclerView recyclerView;
    @Override
    public Object setLayout() {
        return R.layout.delegate_teacher_price;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState, @NonNull View rootView) {
       initData();

    }

    private void initData() {
        ArrayList<MultipleItemEntity> data=new TeacherDefaultConvert().convert();
        TeacherDefaultPriceAdapter adapter=new TeacherDefaultPriceAdapter(data);
        LinearLayoutManager manager=new LinearLayoutManager(getContext());
        manager.setOrientation(LinearLayoutManager.VERTICAL);
        recyclerView.setAdapter(adapter);
        recyclerView.setLayoutManager(manager);
    }
}
